package cn.main.dao;

import org.springframework.dao.support.DaoSupport;
import sun.plugin2.message.GetAppletMessage;

import java.util.List;
import java.util.Map;

/**
 * Author: chengwei
 * Date:   2016/5/20
 * Time:   9:34
 */
public interface DomainDao extends BaseDao {
    
    
    void setCacheQueries(boolean b); 
    
    <T> T getDomain(String Id,Class<T> clazz);

    <T> T getDomain(String hql,Object...args);

    <T> List<T> getDomains(Class<T> clazz, Map<String,Object> where);

    <T> List<T> getDomains(Class<T> clazz);

    <T> List<T> getDomains(Class<T> clazz,String where, Object...args);

    <T> List<Map<String,Object>> getListMap(Class<T> clazz, Map<String,Object> where);

    <T> List<Map<String,Object>> getListMap(Class<T> clazz, Object...args);

    List<Map<String,Object>> getListMap(String hql, Object...args);
    
    <T> void saveDomain(T t);

    <T> void deleteDomain(T t);
}
